Import('rtconfig')
from building import *

cwd = GetCurrentDir()
path = [cwd + '/drivers', cwd + '/libraries/zfkj', cwd + '/libraries/seekfree', cwd + '/startup/DeviceSupport', cwd + '/startup/CoreSupport']
src = Split('''
            startup/DeviceSupport/system_MK60D10.c
			libraries/zfkj/common.c
			libraries/zfkj/misc.c
			libraries/zfkj/MK60DN10_port.c
			libraries/zfkj/MK60DN10_adc.c
			libraries/zfkj/MK60DN10_cmt.c
			libraries/zfkj/MK60DN10_dac.c
			libraries/zfkj/MK60DN10_dma.c
			libraries/zfkj/MK60DN10_flash.c
			libraries/zfkj/MK60DN10_ftm.c
			libraries/zfkj/MK60DN10_gpio.c
			libraries/zfkj/MK60DN10_i2c.c
			libraries/zfkj/MK60DN10_lptmr.c
			libraries/zfkj/MK60DN10_pit.c
			libraries/zfkj/MK60DN10_port.c
			libraries/zfkj/MK60DN10_rtc.c
			libraries/zfkj/MK60DN10_sdhc.c
			libraries/zfkj/MK60DN10_spi.c
			libraries/zfkj/MK60DN10_systick.c
			libraries/zfkj/MK60DN10_uart.c
			libraries/zfkj/MK60DN10_wdog.c
            ''')
if rtconfig.CROSS_TOOL == 'gcc':
    src += ['startup/DeviceSupport/gcc/startup_MK60D10.S']
elif rtconfig.CROSS_TOOL == 'keil':
    src += ['startup/DeviceSupport/MDK-ARM/startup_MK60D10.s']
elif rtconfig.CROSS_TOOL == 'iar':
    src += ['startup/DeviceSupport/IAR-ARM/startup_MK60D10.s']

group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)

Return('group')
